import { BasicPageParams, BasicFetchResult } from '@/api/model/baseModel';

//user
export type GetUserPageListReq = BasicPageParams & {
  kw?: string;
  role_id?: number;
  dept_id?: number;
  status?: number;
};

export interface CreateUserReq {
  username: string;
  nick_name: string;
  email: string;
  phone: string;
  dept_id: number;
  role_id: number;
  sex: number;
  status: number;
  remark: string;
}

export interface UpdateUserReq extends CreateUserReq {
  uid: number;
}

export interface UserListItem {
  uid: number;
  username: string;
  nick_name: string;
  avatar: string;
  email: string;
  phone: string;
  role_id: number;
  dept_id: number;
  status: number;
  sex: number;
  remark: string;
  created_at: string;
}

export interface ResetPasswordReq {
  password: string;
  new_password: string;
}

export type GetUserPageListRes = BasicFetchResult<UserListItem>;
